﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Baidu.Push.Api
{
    public interface IPushClient
    {
        /// <summary>
        /// 执行PUSH API请求。
        /// </summary>
        /// <typeparam name="T">领域对象</typeparam>
        /// <param name="request">具体的Push API请求</param>
        /// <returns>领域对象</returns>
        T Execute<T>(IPushRequest<T> request) where T : PushResponse;

        /// <summary>
        /// 执行PUSH API请求。
        /// </summary>
        /// <typeparam name="T">领域对象</typeparam>
        /// <param name="request">具体的TOP API请求</param>
        /// <param name="resource">资源名</param>
        /// <param name="timestamp">请求时间戳</param>
        /// <returns>领域对象</returns>
        T Execute<T>(IPushRequest<T> request, string resource) where T : PushResponse;

        /// <summary>
        /// 执行PUSH API请求。
        /// </summary>
        /// <typeparam name="T">领域对象</typeparam>
        /// <param name="request">具体的TOP API请求</param>
        /// <param name="resource">资源名</param>
        /// <param name="timestamp">请求时间戳</param>
        /// <returns>领域对象</returns>
        T Execute<T>(IPushRequest<T> request, string resource, DateTime timestamp) where T : PushResponse;
    }
}
